/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pb138.xml.wrda_data_layer;

import cz.muni.fi.pb138.xml.wrda.core.WAR;
import cz.muni.fi.pb138.xml.wrda.core.Wsdl;
import cz.muni.fi.pb138.xml.wrda.core.XSD;
import cz.muni.fi.pb138.xml.wrda.dao.WARDao;
import cz.muni.fi.pb138.xml.wrda.dao.WARDaoImpl;
import cz.muni.fi.pb138.xml.wrda.dao.WsdlDao;
import cz.muni.fi.pb138.xml.wrda.dao.WsdlDaoImpl;
import cz.muni.fi.pb138.xml.wrda.dao.XSDDao;
import cz.muni.fi.pb138.xml.wrda.dao.XSDDaoImpl;

/**
 *
 * @author Ondřej Chrastina 430596@mail.muni.cz
 */
public class DBFakeDataCreator {

    public static void main(String[] args) {

        //WAR objects 
        WAR test = new WAR();
        test.setFileName("test");
        test.getFilters().add("filter");
        test.getListeners().add("listener");
//        test.setId(1L);

        WAR test2 = new WAR();
        test2.setFileName("test2");
        test2.getFilters().add("filter2");
        test2.getFilters().add("filter3");
        test2.getListeners().add("listener2");
//        test2.setId(2L);

        WAR test3 = new WAR();
//        test3.setId(3L);
        test3.setFileName("test3");

        WARDao warDao = new WARDaoImpl();
        warDao.save(test);
        warDao.save(test2);
        warDao.save(test3);

        //XSD
        XSD item1 = new XSD();
//        item1.setId(1L);
        item1.setFileName("item1");

        XSD item2 = new XSD();
//        item2.setId(1L);
        item2.setFileName("item2");

        XSD item3 = new XSD();
//        item3.setId(1L);
        item3.setFileName("item3");

        XSDDao xsdDao = new XSDDaoImpl();
        xsdDao.save(item1);
        xsdDao.save(item2);
        xsdDao.save(item3);

        Wsdl temp1 = new Wsdl();
//        temp1.setId(1L);
        temp1.setFileName("temp1");

        Wsdl temp2 = new Wsdl();
//        temp2.setId(1L);
        temp2.setFileName("temp2");

        Wsdl temp3 = new Wsdl();
//        temp3.setId(1L);
        temp3.setFileName("temp3");
        
        WsdlDao wsdlDao = new WsdlDaoImpl();
        wsdlDao.save(temp1);
        wsdlDao.save(temp2);
        wsdlDao.save(temp3);

    }
}
